package guiLayer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;

public class PersonGUI extends JFrame {

	private JPanel contentPane;
	ProEmpGUI proEmpPanel = new ProEmpGUI();
	StoreEmpGUI storeEmpPanel = new StoreEmpGUI();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					PersonGUI frame = new PersonGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public PersonGUI() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1024, 679);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		makeJTabbedPane();
		
	}
	
	public JPanel makeAll(){
		return contentPane;
	}
	
	private void makeJTabbedPane(){	
		
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, BorderLayout.CENTER);
		
		JPanel proEmpTab = proEmpPanel.makeAll(); 
		
		tabbedPane.addTab("Produktions medarbejder", null, proEmpTab, null);
		
		JPanel storeEmpTab = storeEmpPanel.makeAll();
		
		tabbedPane.addTab("lager medarbejder", null, storeEmpTab, null);
		
	}

}
